package com.wn26.dao.impl;

import java.sql.SQLException;
import java.util.List;

import org.apache.commons.dbutils.QueryRunner;
import org.apache.commons.dbutils.handlers.BeanListHandler;

import com.wn26.bean.GoodsInfo;
import com.wn26.dao.GoodsInfoDao;
import com.wn26.utils.DataSourceUtils;

public class GoodsInfoDaoImpl implements GoodsInfoDao {

	@Override
	public List<GoodsInfo> listGoodsInfo() throws SQLException {
		QueryRunner runner = new QueryRunner(DataSourceUtils.getDataSource());
		return runner.query("select * from goods_info ",new BeanListHandler <GoodsInfo> (GoodsInfo.class));
	}

}
